#pragma once

#include "../util.hpp"
#include "../result.hpp"

namespace pharmacy_server
{
    class MedicineView
    {
    public:
        Result add_medicine(bool succ, const std::string& desc)
        {
            if (succ)
                return Result(Result::SUCCESS, desc);
            else
                return Result(Result::FAILED, desc);
        }

        Result edit_medicine(bool succ, const std::string& desc)
        {
            if (succ)
                return Result(Result::SUCCESS, desc);
            else
                return Result(Result::FAILED, desc);
        }

        Result delete_medicine(bool succ, const std::string& desc)
        {
            if (succ)
                return Result(Result::SUCCESS, desc);
            else
                return Result(Result::FAILED, desc);
        }

        Result query_medicines_by_category(bool succ, const std::string& desc, const std::string& data = "")
        {
            if (succ)
                return Result(Result::SUCCESS, desc, data);
            else
                return Result(Result::FAILED, desc);
        }

        Result query_medicines_by_keyword(bool succ, const std::string& desc, const std::string& data = "")
        {
            if (succ)
                return Result(Result::SUCCESS, desc, data);
            else
                return Result(Result::FAILED, desc);
        };

        Result query_medicine_by_name(bool succ, const std::string& desc, const std::string& data = "")
        {
            if (succ)
                return Result(Result::SUCCESS, desc, data);
            else
                return Result(Result::FAILED, desc);
        }

        Result get_medicine(bool succ, const std::string& desc, const std::string& data = "")
        {
            if (succ)
                return Result(Result::SUCCESS, desc, data);
            else
                return Result(Result::FAILED, desc);
        }

        Result take_medicine(bool succ, const std::string& desc)
        {
            if (succ)
                return Result(Result::SUCCESS, desc);
            else
                return Result(Result::FAILED, desc);
        }
    };
}